﻿
--修改固定补助
CREATE proc [dbo].[proc_Employee_Allowance_Update]
(
	@CompanyList nvarchar(500),
	@Amount numeric(18,2),
	@Memo text,
	@EAId uniqueidentifier,
	@PostId int,
	@Pid int,
	@Cid int
)
as
begin
	--删除主表
	update Employee_Allowance set Amount=@Amount,Memo=@Memo,PostId=@PostId,Pid=@Pid,Cid=@Cid where EAId=@EAId
	--删除从表
	--Delete From Employee_Allowance_Company Where EAId=@EAId
	--插入主表
	/*Declare @i int
		Set @i=0
		while(@i<len(@CompanyList))
			Begin
				Insert Into Employee_Allowance_Company(CompanyId,EAId) Values(substring(@CompanyList,@i,charindex(',',@CompanyList,@i)-@i),@EAId)
				Set @i=charindex(',',@CompanyList,@i)+1
			End
	*/
   end
	RETURN
